/// App内通用定位信息
export type GeoLocation = {
  longitude: number;
  latitude: number;
  address: string;
};

/// 高德地图搜索结果
export type AMapSearchResultTips = {
  name: string; /// 名称
  address: string; /// 详细地址
  location: string; /// 经纬度
  district: string; /// 行政区
};

export type AMapSearchResult = {
  tips: AMapSearchResultTips[];
};

export type GooglePlacePrediction = {
  placeId: string;
  text: {
    text: string;
  };
  structuredFormat: {
    mainText: {
      text: string
    }
  }
};

export type GoogleSearchResultSuggestions = {
  /// 谷歌地图关键词建议，谷歌觉得这个是用户想要的，可以不用管
  queryPrediction: any;
  placePrediction: GooglePlacePrediction;
};

export type GoogleSearchResult = {
  suggestions: GoogleSearchResultSuggestions[];
};


export interface GooglePlaceDetails {
    id:                    string;
    formattedAddress:      string;
    location:              Location;
    shortFormattedAddress: string;
}

export interface Location {
    latitude:  number;
    longitude: number;
}
